package com.woniuxy.intellihome.service.impl;

import com.woniuxy.intellihome.entity.User;
import com.woniuxy.intellihome.mapper.UserMapper;
import com.woniuxy.intellihome.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-08-11
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getByAccount(String account) {
        return userMapper.getByAccount(account);
    }

    @Override
    public String getAccountById(int id) {
        return userMapper.getAccountById(id);
    }

    @Override
    public void add(User user) {
        userMapper.add(user);
    }

    @Override
    public User getUserByEmail(String email) {
        return userMapper.getUserByEmail(email);
    }
}
